<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>百度在线考试平台</title>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
    <script src="/bootstrap/js/jquery.min.js"></script>
</head>
<body>

<div class="container">
    <div class="panel panel-success">
        <div class="panel-heading panel-title">
            <h1>${radioList[0].title}试题</h1>
        </div>
        <div class="panel-body">
            <c:if test="${radioList[0].type==1}">
                <h3>单选题</h3><h5>(共${radioList[0].radioCount}题，每道题${radioList[0].radioScore}分)</h5>
                <c:forEach var="question" items="${radioList}" varStatus="status">
                    <div class="panel panel-default">
                        <div class="panel-heading panel-title">
                            第${status.index + 1}题：${question.questionTitle}
                            <c:forEach var="answer" items="${question.answerList}" varStatus="status">
                                <p>${answer.context}</p>
                                <c:if test="${answer.correctFlag=='1'}">
                                    <c:set var="isAnswer" value="${answer.context}"></c:set>
                                </c:if>
                            </c:forEach>
                            <div class="row">
                                <hr/>
                                正确答案： <font color="green">${isAnswer}</font>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </c:if>
            <c:if test="${checkList[0].type==2}">
            <h3>多选题</h3><h5>(共${checkList[0].checkCount}题，每道题${checkList[0].checkScore}分)</h5>
                <c:forEach var="question" items="${checkList}" varStatus="status">
                    <div class="panel panel-default">
                        <div class="panel-heading panel-title">
                            第${status.index + 1}题：${question.questionTitle}
                            <c:forEach var="answer" items="${question.answerList}" varStatus="status">
                                <p>${answer.context}</p>
                                <c:if test="${answer.correctFlag=='1'}">
                                    <c:set var="isAnswer" value="${answer.context}"></c:set>
                                </c:if>
                            </c:forEach>
                            <div class="row">
                                <hr/>
                                正确答案： <font color="green">${isAnswer}</font>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </c:if>
            <c:if test="${judgeList[0].type==3}">
            <h3>判断题</h3><h5>(共${judgeList[0].judgeCount}题，每道题${judgeList[0].judgeScore}分)</h5>
                <c:forEach var="question" items="${judgeList}" varStatus="status">
                    <div class="panel panel-default">
                        <div class="panel-heading panel-title">
                            第${status.index + 1}题：${question.questionTitle}
                            <div class="row">
                                <hr/>
                                正确答案： <font color="green">${question.answerId=='1'?'对':'错'}</font>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </c:if>
        </div>
        <div class="panel-footer text-right">
            百度在线考试平台
        </div>
    </div>
</div>
</body>
</html>
